3.94 \(\int \frac {\cos (a+b \sqrt {c+d x})}{x^2} \, dx\)

Optimal. Leaf size=184 \[ \frac {b d \sin \left (a-b \sqrt {c}\right ) \text {Ci}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}-\frac {b d \sin \left (a+b \sqrt {c}\right ) \text {Ci}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \]

[Out]

-cos(a+b*(d*x+c)^(1/2))/x+1/2*b*d*cos(a-b*c^(1/2))*Si(b*(c^(1/2)+(d*x+c)^(1/2)))/c^(1/2)+1/2*b*d*cos(a+b*c^(1/
2))*Si(b*c^(1/2)-b*(d*x+c)^(1/2))/c^(1/2)+1/2*b*d*Ci(b*(c^(1/2)+(d*x+c)^(1/2)))*sin(a-b*c^(1/2))/c^(1/2)-1/2*b
*d*Ci(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))/c^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.35, antiderivative size = 184, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3432, 3342, 3333, 3303, 3299, 3302} \[ \frac {b d \sin \left (a-b \sqrt {c}\right ) \text {CosIntegral}\left (b \left (\sqrt {c+d x}+\sqrt {c}\right )\right )}{2 \sqrt {c}}-\frac {b d \sin \left (a+b \sqrt {c}\right ) \text {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*Sqrt[c + d*x]]/x^2,x]

[Out]

-(Cos[a + b*Sqrt[c + d*x]]/x) + (b*d*CosIntegral[b*(Sqrt[c] + Sqrt[c + d*x])]*Sin[a - b*Sqrt[c]])/(2*Sqrt[c])
- (b*d*CosIntegral[b*Sqrt[c] - b*Sqrt[c + d*x]]*Sin[a + b*Sqrt[c]])/(2*Sqrt[c]) + (b*d*Cos[a - b*Sqrt[c]]*SinI
ntegral[b*(Sqrt[c] + Sqrt[c + d*x])])/(2*Sqrt[c]) + (b*d*Cos[a + b*Sqrt[c]]*SinIntegral[b*Sqrt[c] - b*Sqrt[c +
 d*x]])/(2*Sqrt[c])

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3333

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (a +
 b*x^n)^p, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IGtQ[n, 0] && (EqQ[n, 2] || EqQ[p, -1])

Rule 3342

Int[Cos[(c_.) + (d_.)*(x_)]*((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(e^m*(a + b*x^
n)^(p + 1)*Cos[c + d*x])/(b*n*(p + 1)), x] + Dist[(d*e^m)/(b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*Sin[c + d*x],
 x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, -1] && EqQ[m, n - 1] && (IntegerQ[n] || GtQ[e, 0])

Rule 3432

Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_.) + (h_.)*(x_))^(m_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - (e*h)/f + (h*x^(1/n))/f)^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps

\begin {align*} \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x^2} \, dx &=\frac {2 \operatorname {Subst}\left (\int \frac {x \cos (a+b x)}{\left (-\frac {c}{d}+\frac {x^2}{d}\right )^2} \, dx,x,\sqrt {c+d x}\right )}{d}\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}-b \operatorname {Subst}\left (\int \frac {\sin (a+b x)}{-\frac {c}{d}+\frac {x^2}{d}} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}-b \operatorname {Subst}\left (\int \left (-\frac {d \sin (a+b x)}{2 \sqrt {c} \left (\sqrt {c}-x\right )}-\frac {d \sin (a+b x)}{2 \sqrt {c} \left (\sqrt {c}+x\right )}\right ) \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}+\frac {(b d) \operatorname {Subst}\left (\int \frac {\sin (a+b x)}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {(b d) \operatorname {Subst}\left (\int \frac {\sin (a+b x)}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}+\frac {\left (b d \cos \left (a-b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}-\frac {\left (b d \cos \left (a+b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {\left (b d \sin \left (a-b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {\left (b d \sin \left (a+b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}+\frac {b d \text {Ci}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right ) \sin \left (a-b \sqrt {c}\right )}{2 \sqrt {c}}-\frac {b d \text {Ci}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \sin \left (a+b \sqrt {c}\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.20, size = 240, normalized size = 1.30 \[ \frac {i \left (e^{-i a} \left (-b d x e^{-i b \sqrt {c}} \text {Ei}\left (-i b \left (\sqrt {c+d x}-\sqrt {c}\right )\right )+b d x e^{i b \sqrt {c}} \text {Ei}\left (-i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+2 i \sqrt {c} e^{-i b \sqrt {c+d x}}\right )+e^{i \left (a-b \sqrt {c}\right )} \left (b d x e^{2 i b \sqrt {c}} \text {Ei}\left (i b \left (\sqrt {c+d x}-\sqrt {c}\right )\right )-b d x \text {Ei}\left (i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+2 i \sqrt {c} e^{i b \left (\sqrt {c+d x}+\sqrt {c}\right )}\right )\right )}{4 \sqrt {c} x} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*Sqrt[c + d*x]]/x^2,x]

[Out]

((I/4)*((((2*I)*Sqrt[c])/E^(I*b*Sqrt[c + d*x]) - (b*d*x*ExpIntegralEi[(-I)*b*(-Sqrt[c] + Sqrt[c + d*x])])/E^(I
*b*Sqrt[c]) + b*d*E^(I*b*Sqrt[c])*x*ExpIntegralEi[(-I)*b*(Sqrt[c] + Sqrt[c + d*x])])/E^(I*a) + E^(I*(a - b*Sqr
t[c]))*((2*I)*Sqrt[c]*E^(I*b*(Sqrt[c] + Sqrt[c + d*x])) + b*d*E^((2*I)*b*Sqrt[c])*x*ExpIntegralEi[I*b*(-Sqrt[c
] + Sqrt[c + d*x])] - b*d*x*ExpIntegralEi[I*b*(Sqrt[c] + Sqrt[c + d*x])])))/(Sqrt[c]*x)

________________________________________________________________________________________

fricas [C]  time = 0.98, size = 210, normalized size = 1.14 \[ \frac {\sqrt {-b^{2} c} d x {\rm Ei}\left (i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (i \, a + \sqrt {-b^{2} c}\right )} - \sqrt {-b^{2} c} d x {\rm Ei}\left (i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (i \, a - \sqrt {-b^{2} c}\right )} + \sqrt {-b^{2} c} d x {\rm Ei}\left (-i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (-i \, a + \sqrt {-b^{2} c}\right )} - \sqrt {-b^{2} c} d x {\rm Ei}\left (-i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (-i \, a - \sqrt {-b^{2} c}\right )} - 4 \, c \cos \left (\sqrt {d x + c} b + a\right )}{4 \, c x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x^2,x, algorithm="fricas")

[Out]

1/4*(sqrt(-b^2*c)*d*x*Ei(I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^(I*a + sqrt(-b^2*c)) - sqrt(-b^2*c)*d*x*Ei(I*sqrt
(d*x + c)*b + sqrt(-b^2*c))*e^(I*a - sqrt(-b^2*c)) + sqrt(-b^2*c)*d*x*Ei(-I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^
(-I*a + sqrt(-b^2*c)) - sqrt(-b^2*c)*d*x*Ei(-I*sqrt(d*x + c)*b + sqrt(-b^2*c))*e^(-I*a - sqrt(-b^2*c)) - 4*c*c
os(sqrt(d*x + c)*b + a))/(c*x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x^2,x, algorithm="giac")

[Out]

integrate(cos(sqrt(d*x + c)*b + a)/x^2, x)

________________________________________________________________________________________

maple [B]  time = 0.08, size = 714, normalized size = 3.88 \[ \frac {2 d \left (\frac {\cos \left (a +b \sqrt {d x +c}\right ) \left (-\frac {b^{2} a \left (a +b \sqrt {d x +c}\right )}{2 c}+\frac {b^{2} \left (-c \,b^{2}+a^{2}\right )}{2 c}\right )}{-c \,b^{2}+\left (a +b \sqrt {d x +c}\right )^{2}-2 a \left (a +b \sqrt {d x +c}\right )+a^{2}}-\frac {b a \left (\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}+\frac {b a \left (-\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}-\frac {b \left (c \,b^{2}+a \left (a +b \sqrt {c}\right )-a^{2}\right ) \left (-\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \sin \left (a +b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}+\frac {b \left (c \,b^{2}+a \left (a -b \sqrt {c}\right )-a^{2}\right ) \left (\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}-a \,b^{4} \left (\frac {\cos \left (a +b \sqrt {d x +c}\right ) \left (-\frac {a +b \sqrt {d x +c}}{2 c \,b^{2}}+\frac {a}{2 c \,b^{2}}\right )}{-c \,b^{2}+\left (a +b \sqrt {d x +c}\right )^{2}-2 a \left (a +b \sqrt {d x +c}\right )+a^{2}}-\frac {\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{4 c^{\frac {3}{2}} b^{3}}+\frac {-\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{4 c^{\frac {3}{2}} b^{3}}-\frac {-\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \sin \left (a +b \sqrt {c}\right )}{4 c \,b^{2}}-\frac {\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )}{4 c \,b^{2}}\right )\right )}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b*(d*x+c)^(1/2))/x^2,x)

[Out]

2*d/b^2*(cos(a+b*(d*x+c)^(1/2))*(-1/2*b^2*a/c*(a+b*(d*x+c)^(1/2))+1/2*b^2*(-b^2*c+a^2)/c)/(-c*b^2+(a+b*(d*x+c)
^(1/2))^2-2*a*(a+b*(d*x+c)^(1/2))+a^2)-1/4*b*a/c^(3/2)*(Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))+Ci(b*(d
*x+c)^(1/2)-b*c^(1/2))*cos(a+b*c^(1/2)))+1/4*b*a/c^(3/2)*(-Si(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2))+Ci(b
*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2)))-1/4*b*(c*b^2+a*(a+b*c^(1/2))-a^2)/c^(3/2)*(-Si(b*c^(1/2)-b*(d*x+c)
^(1/2))*cos(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2))*sin(a+b*c^(1/2)))+1/4*b*(c*b^2+a*(a-b*c^(1/2))-a^2)/c^(
3/2)*(Si(b*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2))+Ci(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2)))-a*b^4*(co
s(a+b*(d*x+c)^(1/2))*(-1/2/c/b^2*(a+b*(d*x+c)^(1/2))+1/2*a/c/b^2)/(-c*b^2+(a+b*(d*x+c)^(1/2))^2-2*a*(a+b*(d*x+
c)^(1/2))+a^2)-1/4/c^(3/2)/b^3*(Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2))*c
os(a+b*c^(1/2)))+1/4/c^(3/2)/b^3*(-Si(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2))+Ci(b*(d*x+c)^(1/2)+b*c^(1/2)
)*cos(a-b*c^(1/2)))-1/4/c/b^2*(-Si(b*c^(1/2)-b*(d*x+c)^(1/2))*cos(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2))*s
in(a+b*c^(1/2)))-1/4/c/b^2*(Si(b*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2))+Ci(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a
-b*c^(1/2)))))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x^2,x, algorithm="maxima")

[Out]

integrate(cos(sqrt(d*x + c)*b + a)/x^2, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (a+b\,\sqrt {c+d\,x}\right )}{x^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*(c + d*x)^(1/2))/x^2,x)

[Out]

int(cos(a + b*(c + d*x)^(1/2))/x^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (a + b \sqrt {c + d x} \right )}}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b*(d*x+c)**(1/2))/x**2,x)

[Out]

Integral(cos(a + b*sqrt(c + d*x))/x**2, x)

________________________________________________________________________________________